package com.plugin.sproutcore.util;

public class StringUtil 
{
	
	/**
	 * Capitalize the first letter of a string.
	 * 
	 * @param str
	 * String to capitalize.
	 * 
	 * @return
	 * The string with the first letter capitalized.
	 */
	public static String capFirstLetter(String str)
	{
		int stringLength = str.length();
		if (stringLength > 0) 
		{
			StringBuilder builder = new StringBuilder(stringLength);
			builder.append(Character.toUpperCase(str.charAt(0)));
			if (stringLength > 1) {
				builder.append(str.substring(1));
			}
			return builder.toString();
		}
		return str;
	}
	
}
